<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Ckafka\V20190819\Models;
use TencentCloud\Common\AbstractModel;

/**
 * BatchModifyGroupOffsets request structure.
 *
 * @method string getGroupName() Obtain Consumer group name.
 * @method void setGroupName(string $GroupName) Set Consumer group name.
 * @method string getInstanceId() Obtain The ckafka cluster instance Id.
 * @method void setInstanceId(string $InstanceId) Set The ckafka cluster instance Id.
 * @method array getPartitions() Obtain Partition information.
 * @method void setPartitions(array $Partitions) Set Partition information.
 * @method array getTopicName() Obtain Name of the specified topic. Default value: names of all topics.
 * @method void setTopicName(array $TopicName) Set Name of the specified topic. Default value: names of all topics.
 */
class BatchModifyGroupOffsetsRequest extends AbstractModel
{
    /**
     * @var string Consumer group name.
     */
    public $GroupName;

    /**
     * @var string The ckafka cluster instance Id.
     */
    public $InstanceId;

    /**
     * @var array Partition information.
     */
    public $Partitions;

    /**
     * @var array Name of the specified topic. Default value: names of all topics.
     */
    public $TopicName;

    /**
     * @param string $GroupName Consumer group name.
     * @param string $InstanceId The ckafka cluster instance Id.
     * @param array $Partitions Partition information.
     * @param array $TopicName Name of the specified topic. Default value: names of all topics.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("GroupName",$param) and $param["GroupName"] !== null) {
            $this->GroupName = $param["GroupName"];
        }

        if (array_key_exists("InstanceId",$param) and $param["InstanceId"] !== null) {
            $this->InstanceId = $param["InstanceId"];
        }

        if (array_key_exists("Partitions",$param) and $param["Partitions"] !== null) {
            $this->Partitions = [];
            foreach ($param["Partitions"] as $key => $value){
                $obj = new Partitions();
                $obj->deserialize($value);
                array_push($this->Partitions, $obj);
            }
        }

        if (array_key_exists("TopicName",$param) and $param["TopicName"] !== null) {
            $this->TopicName = $param["TopicName"];
        }
    }
}
